package com.kyivmohyla.kma2.model;

import com.google.gwt.user.client.rpc.IsSerializable;

public class Staff implements IsSerializable {
    private int staffId;
    private String firstName;
    private String lastName;
    private String email;
    private String password;
    private int positionId;

    public Staff() {
    }

    public int getStaffId() {
        return staffId;
    }

    public void setStaffId(int staffId) {
        this.staffId = staffId;
    }

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getPositionId() {
        return positionId;
    }

    public void setPositionId(int positionId) {
        this.positionId = positionId;
    }

    @Override
    public boolean equals(Object other) {
        return (other instanceof Staff) ? staffId == ((Staff) other).staffId
                : (other == this);
    }

    @Override
    public int hashCode() {
        return this.getClass().hashCode();
    }

    @Override
    public String toString() {
        return String
                .format("Staff(staffId = %d, firstName = %s, lastName = %s, email = %s, password = %s, positionId = %d)",
                        staffId, firstName, lastName, email, password, positionId);
    }
}